/**
 * 
 */
package org.vsg.stock.basic.persistence.mybatis;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.dao.DataAccessException;
import org.vsg.stock.basic.domain.VolFigureDetails;
import org.vsg.stock.basic.persistence.VolFigureDetailsDao;

/**
 * @author Bill Vison
 *
 */
public class VolFigureDetailsDaoImpl extends SqlSessionDaoSupport implements VolFigureDetailsDao {

	@Override
	public Set<VolFigureDetails> findByFigureCode(String code)
			throws DataAccessException {
		String statement = "org.vsg.stock.basic.domain.mybatis.VolFigureDetailsProxy.findByFigureCode";
		List result  = this.getSqlSessionTemplate().selectList(statement, code);
		
		
		Set<VolFigureDetails> resultSet = new HashSet<VolFigureDetails>();
		resultSet.addAll( (List<VolFigureDetails>)result );

		return resultSet;
	}

	@Override
	public Set<VolFigureDetails> findAll() throws DataAccessException {
		// TODO Auto-generated method stub
		String statement = "org.vsg.stock.basic.domain.mybatis.VolFigureDetailsProxy.findAll";
		List result  = this.getSqlSessionTemplate().selectList(statement);
		
		
		Set<VolFigureDetails> resultSet = new HashSet<VolFigureDetails>();
		resultSet.addAll( (List<VolFigureDetails>)result );

		return resultSet;
	}

	
	
}
